Resolve negative time values and formatting errors when calculating overnight work shifts in spreadsheets.